﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OgonPhonesXML.Aastra.Serializer
{
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
    [System.SerializableAttribute()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.ComponentModel.DesignerCategoryAttribute("code")]
    [System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true)]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "", IsNullable = false)]
    public partial class AastraIPPhoneFormattedTextScreen
    {
        private lineTagType[] lineField;
        private List<lineTagType> listLineType = new List<lineTagType>();
        private List<lineTagType> listLineScroll = new List<lineTagType>();

        private AastraIPPhoneFormattedTextScreenScroll scrollField;

        private lineTagType[] line1Field;
        

        private softKeyType[] softKeyField;
        private List<softKeyType> listSoftKey = new List<softKeyType>();

        private string destroyOnExitField;

        private string beepField;

        private string lockInField;

        private string timeoutField;

        private string cancelActionField;

        private string doneActionField;

        private string allowAnswerField;

        private string allowDTMFField;

        private string allowDropField;

        private string allowConfField;

        private string allowXferField;

        public AastraIPPhoneFormattedTextScreen()
        {
            this.destroyOnExitField = "no";
            this.beepField = "no";
            this.lockInField = "no";
            this.timeoutField = "45";
            this.allowAnswerField = "no";
            this.allowDTMFField = "no";
            this.allowDropField = "no";
            this.allowConfField = "no";
            this.allowXferField = "no";
        }
        public void addLine(string text, string size, string align)
        {
            lineTagType psvLineTag = new lineTagType();
            String[] finalText = { text };
            psvLineTag.Text = finalText;
            psvLineTag.Size = size;
            psvLineTag.Align = align;
            listLineType.Add(psvLineTag);
        }
        public void addLineOnScroll(string text, string size, string align)
        {
            lineTagType psvLineTag = new lineTagType();
            String[] finalText = { text };
            psvLineTag.Text = finalText;
            psvLineTag.Size = size;
            psvLineTag.Align = align;
            listLineScroll.Add(psvLineTag);
        }
        public void addSoftKey(string label, string uri, string index)
        {
            softKeyType psvSoftKey = new softKeyType();
            psvSoftKey.Label = label;
            psvSoftKey.URI = uri;
            psvSoftKey.index = index;
            listSoftKey.Add(psvSoftKey);           
        }
        public void addSoftKey(string label, string uri, string index, string icon)
        {
            softKeyType psvSoftKey = new softKeyType();
            psvSoftKey.Label = label;
            psvSoftKey.URI = uri;
            psvSoftKey.index = index;
            psvSoftKey.icon = icon;
            listSoftKey.Add(psvSoftKey);
        }
       
        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("Line", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, Order = 0)]
        public lineTagType[] Line
        {
            get
            {
                this.lineField = listLineType.ToArray();
                return this.lineField;
            }
            set
            {
                this.lineField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified, Order = 1)]
        public AastraIPPhoneFormattedTextScreenScroll Scroll
        {
            get
            {
                if (listLineScroll.Count > 0)
                {
                    this.scrollField.Line = listLineScroll.ToArray();
                }
                return this.scrollField;
            }
            set
            {
                this.scrollField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("Line", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, Order = 2)]
        public lineTagType[] Line1
        {
            get
            {
                return this.line1Field;
            }
            set
            {
                this.line1Field = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlElementAttribute("SoftKey", Form = System.Xml.Schema.XmlSchemaForm.Unqualified, Order = 3)]
        public softKeyType[] SoftKey
        {
            get
            {
                this.softKeyField = listSoftKey.ToArray();
                return this.softKeyField;
            }
            set
            {
                this.softKeyField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string destroyOnExit
        {
            get
            {
                return this.destroyOnExitField;
            }
            set
            {
                this.destroyOnExitField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string Beep
        {
            get
            {
                return this.beepField;
            }
            set
            {
                this.beepField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string LockIn
        {
            get
            {
                return this.lockInField;
            }
            set
            {
                this.lockInField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute(DataType = "integer")]
        [System.ComponentModel.DefaultValueAttribute("45")]
        public string Timeout
        {
            get
            {
                return this.timeoutField;
            }
            set
            {
                this.timeoutField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string cancelAction
        {
            get
            {
                return this.cancelActionField;
            }
            set
            {
                this.cancelActionField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        public string doneAction
        {
            get
            {
                return this.doneActionField;
            }
            set
            {
                this.doneActionField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string allowAnswer
        {
            get
            {
                return this.allowAnswerField;
            }
            set
            {
                this.allowAnswerField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string allowDTMF
        {
            get
            {
                return this.allowDTMFField;
            }
            set
            {
                this.allowDTMFField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string allowDrop
        {
            get
            {
                return this.allowDropField;
            }
            set
            {
                this.allowDropField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string allowConf
        {
            get
            {
                return this.allowConfField;
            }
            set
            {
                this.allowConfField = value;
            }
        }

        /// <comentarios/>
        [System.Xml.Serialization.XmlAttributeAttribute()]
        [System.ComponentModel.DefaultValueAttribute("no")]
        public string allowXfer
        {
            get
            {
                return this.allowXferField;
            }
            set
            {
                this.allowXferField = value;
            }
        }
    }
}
